<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>调出设备申请</title>
		<link rel="stylesheet" type="text/css" href="../../../resource/css/admin_css/list_style.css"/>
        <link rel="stylesheet" type="text/css" href="../../../resource/layui/css/layui.css"/>
		<link rel="stylesheet" type="text/css" href="../../../resource/css/niubility.css"/>
        <script type="text/javascript" src="../../../resource/layui/layui.js"></script>
		<link rel="stylesheet" type="text/css" href="../../../resource/css/bootstrap.css"/>
    </head>
	<body>
		<!--详情：弹出层-->
		<div class="popUp" id="popUp">
			<table class="table table-bordered table-hover"></table>
			<table class="table table-bordered table-hover"></table>
		</div>
	
		<div class="bs">
			<input type="button" id="totalSelection" value="全部选中" />
			<input type="button" id="sure" value="审核" />
		</div>
		
		<table class="layui-table">
			<tbody id="infoBox"></tbody>
			<!--用来分页的div-->
			<div class="fenBox">
				<div id="pagination1"></div>
			</div>
		</table>		
	</body>
	<script type="text/javascript" src="../../../resource/js/jquery.min.js"></script>
	<!--***************所有的静态路径****************-->
	<script src="../../../resource/js/static_url.js"></script>
	<!-- 共同一套：生成信息列表 + 弹出层退回去的代码 -->
	<script src="../../../resource/js/admin_js/admin_review_list.js"></script>
	<!--  购买 、 调入 、调出 、 报损报废的审核函数  -->
	<script src="../../../resource/js/admin_js/admin_review_four.js"></script>
	<script>
		//（1）待审核列表
        myAjax_list_popup(admin_diaochu,'1');
        //（2）审核
        $("#sure").click(function(){
            //参数为： 批量审核post的那种
            examine(admin_diaochu_review,admin_diaochu);
            $("#totalSelection").val("全部选中");
            flag = 1;
        });
		//（3）详情
        function details(that){
            //拿出一个id ,点击第几个，我就拿第几条数据中一个id
            var ids = $(that).attr("data-id");
            $.ajax({
                url: admin_diaochu_details+ids,
                type:"GET",
                async: true,
                success: function(info){
                    if(info.code != 0)
                    {
                        layui.use('layer', function(){
                            var layer = layui.layer;
                            layer.msg(info.msg, {skin:'tip_position',time:'3000'});
                        });
                        return;
                    }
                    var obj1 = info.data;
                    var str1 = "";
                    str1+=
                        '<tr>'+
                        '<td>设备类别</td>'+
                        '<td>设备名称</td>'+
                        '<td>设备编号</td>'+
                        '<td>调出日期</td>'+
                        '</tr>'+
                        '<tr>'+
                        '<td>'+obj1.equipmentCategory+'</td>'+
                        '<td>'+obj1.equipmentName+'</td>'+
                        '<td>'+obj1.equipmentNo+'</td>'+
                        '<td>'+obj1.transerDate+'</td>'+
                        '</tr>';
                    var str2 ="";
                    str2+=
                        '<tr>'+
                        '<td>经手人</td>'+
                        '<td>调入单位</td>'+
                        '<td>调出单位</td>'+
                        '<td>调出原因</td>'+
                        '</tr>'+
                        '<tr>'+
                        '<td>'+obj1.handMan+'</td>'+
                        '<td>'+obj1.transerInUnit+'</td>'+
                        '<td>'+obj1.transerOutUnit+'</td>'+
                        '<td>'+obj1.transerReason+'</td>'+
                        '</tr>';

                    $("#popUp table").eq(0).html(str1);
                    $("#popUp table").eq(1).html(str2);
                    //让内容以弹出层的方式显示出来。
                    $("#popUp").attr({"class":"popUpClick"});
                    // 动态计算 #popUp 的宽度
                    var width_fen = parseInt( $("#popUp").css("width") );
                    width_fen = 801;
                    $("#popUp")[0].style.marginLeft = -width_fen/2-120-60+'px';
                },
                error:function(){
                    layui.use('layer', function(){
                        var layer = layui.layer;
                        layer.msg('系统错误！！！', {skin:'tip_position',time:'3000'});
                    });
                }
            }); //ajax结束
        }
	</script>
</html>
